#ifndef __XCTYPE_H__
#define __XCTYPE_H__

#ifdef _WIN32

#define _WINSOCK_DEPRECATED_NO_WARNINGS
#define WIN32_LEAN_AND_MEAN
#define _CRT_SECURE_NO_WARNINGS

#define X_OS_WIN
#if (_MSC_VER >= 1915)
#define no_init_all deprecated
#endif
#else

#endif

#include <cstdint>
#include <functional>
#include <iostream>
#include <thread>
#include <atomic>
#include <vector>
#include <map>
#include <unordered_map>
#include <list>
#include <functional>
#include <cstdint>
#include <cassert>
#include <unordered_map>
#include <iostream>
#include <fstream>


#ifdef X_OS_WIN

#include <direct.h>
#include <windows.h>
#include <winsock2.h>
#include <windows.h>
#include <MSWSock.h>

#pragma comment(lib, "ws2_32.lib")

#else // linux

#include <string.h>
#include <stdarg.h>
#include <sys/stat.h>

#endif

#define X_ONEK 1024

#ifdef X_OS_WIN

#define XBASEAPI __stdcall

#ifdef _USRDLL
#define XNET_CORE_FUN __declspec(dllexport)
#else
#define XNET_CORE_FUN __declspec(dllimport)
#endif

#else
#define XNET_CORE_FUN
// #define XBASEAPI __attribute__((stdcall))
#define XBASEAPI
#endif // linux

#endif
